package cn.model;

import cn.util.Toolsutil;

import java.sql.Timestamp;

public class TApply {
    private int applyid;
    private String equipmentName;
    private String applicationTime;
    private String reason;
    private String userid;
    private Integer auditstatus;

    public int getApplyid() {
        return applyid;
    }

    public void setApplyid(int applyid) {
        this.applyid = applyid;
    }

    public String getEquipmentName() {
        return equipmentName;
    }

    public void setEquipmentName(String equipmentName) {
        this.equipmentName = equipmentName;
    }

    public String getApplicationTime() {
        return Toolsutil.GetDateFormat(applicationTime);
    }

    public void setApplicationTime(String applicationTime) {
        this.applicationTime = applicationTime;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public Integer getAuditstatus() {
        return auditstatus;
    }

    public void setAuditstatus(Integer auditstatus) {
        this.auditstatus = auditstatus;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TApply tApply = (TApply) o;

        if (applyid != tApply.applyid) return false;
        if (equipmentName != null ? !equipmentName.equals(tApply.equipmentName) : tApply.equipmentName != null)
            return false;
        if (applicationTime != null ? !applicationTime.equals(tApply.applicationTime) : tApply.applicationTime != null)
            return false;
        if (reason != null ? !reason.equals(tApply.reason) : tApply.reason != null) return false;
        if (userid != null ? !userid.equals(tApply.userid) : tApply.userid != null) return false;
        if (auditstatus != null ? !auditstatus.equals(tApply.auditstatus) : tApply.auditstatus != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = applyid;
        result = 31 * result + (equipmentName != null ? equipmentName.hashCode() : 0);
        result = 31 * result + (applicationTime != null ? applicationTime.hashCode() : 0);
        result = 31 * result + (reason != null ? reason.hashCode() : 0);
        result = 31 * result + (userid != null ? userid.hashCode() : 0);
        result = 31 * result + (auditstatus != null ? auditstatus.hashCode() : 0);
        return result;
    }
}
